<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        function Human(name, age) {
            this.name = name
            this.age = age

        }
        Human.prototype.study = function(){
            alert("好好学习");
        }
        function Man(name, age, address) {
            Human.call(this, name, age); //借用Human构造函数初始化对象
            this.address = address
            this.show = function () {
                alert("我的名字是：" + this.name + ",年龄是：" + this.age + ",地址是：" + this.address)
            }
        }
        Man.prototype = new Human(); //原型链继承

        let s = new Man("张三", 20, "重庆")


        s.study()
    </script>
</body>

</html>